import request from '@/utils/request'
export function daysOfQuality(date){
  return request({
    url: '/monitor/pollutant/quality/days',
    method: 'post',
	data:date
  })
}
//当地排名
export function getCityRank(){
  return request({
    url: '/monitor/pollutant/city/rank/nowcity',
    method: 'get',
    // Number:day
  })
}
export function getRank(){
  return request({
    url: '/monitor/pollutant/city/rank',
    method: 'get',
    // Number:day
  })
}
//月份天数统计
export function getDays(){
  return request({
    url: '/monitor/pollutant/bar/days',
    method: 'get',
    // Number:day
  })
}
//周期折线图
export function getAll(){
  return request({
    url: '/monitor/pollutant/all',
    method: 'get',
    // Number:day
  })
}
//周期折线图
export function getCycle(type){
  return request({
    url: '/monitor/pollutant/cycle/'+type,
    method: 'get',
    // Number:day
  })
}


//柱形图七天数据AQI
export function getAqiBar(day){
  return request({
    url: '/monitor/pollutant/aqiBar/'+day,
    method: 'get',
    // Number:day
  })
}

//当天aqi仪表盘
export function getLatestAqi(){
  return request({
    url: '/monitor/pollutant/aqi',
    method: 'get',
  })
}

// 24小时，7天，一个月的各项数据
export function radar(){
  return request({
    url: '/monitor/pollutant/radar',
    method: 'get',
  })
}

// 查询污染物列表
export function listPollutant(query) {
  return request({
    url: '/monitor/pollutant/list',
    method: 'get',
    params: query
  })
}

// 查询污染物详细
export function getPollutant(id) {
  return request({
    url: '/monitor/pollutant/' + id,
    method: 'get'
  })
}

// 新增污染物
export function addPollutant(data) {
  return request({
    url: '/monitor/pollutant',
    method: 'post',
    data: data
  })
}

// 修改污染物
export function updatePollutant(data) {
  return request({
    url: '/monitor/pollutant',
    method: 'put',
    data: data
  })
}

// 删除污染物
export function delPollutant(id) {
  return request({
    url: '/monitor/pollutant/' + id,
    method: 'delete'
  })
}



